The present invention relates to a data storage apparatus and medium such as a memory card.
Memory cards such as PC (personal computer) cards are useful for storing data in electronic still cameras, audio recorders, and computers. Some memory cards employ battery-backed-up random-access memory, while others employ flash memory. Many include a microcontroller unit that manages the memory and communicates with the outside world. Often, the interface with the outside world is a sector-based interface conforming to a standard originally intended for use with rotating magnetic-disk drives.
Access speed is an important issue in both memory cards and disk drives. The prior art includes methods of increasing access speed by striping data across different memory chips or disks, which can be accessed in parallel, or by dividing records into sub-records which can be stored on different disks or chips, as in Japanese Unexamined Patent Application 28226/1994.
Another important issue is fitting as much data as possible into the available storage space. Data compression techniques have come into widespread use for increasing the storage capacity of memory cards and magnetic disks.
A further issue is the capability to edit data in place. In a sector-based system, this refers to the ability to read a stored sector of data, modify the data contents, and store the modified data at the same sector address. This capability is useful when part of an image is modified, for example.
A problem is that if the sector has been stored in a compressed from, then after decompression, modification, and recompression, the new compressed data may be larger than the old compressed data, even if the decompressed data size is unchanged. Thus the modified compressed sector may not fit into the space allocated to the original compressed sector.
A more general problem is that magnetic disks and memory cards often employ a fixed data storage structure, using clusters or blocks having a single fixed length. This type of structure is unsuitable for storing data of variable size. A known solution is to store data in an unstructured linear format, without subdivision into clusters or blocks, but this solution does not readily provide an edit-in-place capability.